System and method for soft failovers for proxy servers

ABSTRACT

A packet broker that performs a health-status check of a proxy server while the proxy server processes one or more proxy connections. The packet broker may attempt to exchange a heartbeat signal with the proxy server, and if unsuccessful, the proxy server is assumed to be failing. In such cases, a failover is desirable. Rather than implementing a “hard” failover, in which no further communication packets are directed to the proxy server, a “soft” failover is performed where the packet broker prevents new proxy connections from being processed by the proxy server, but maintains at least one (e.g., all) of the current proxy connections that are being processed by the proxy server.

FIELD OF THE DISCLOSURE

The present disclosure relates to the management of proxy connections,and specifically, to failover in the event of a failed health statuscheck of a proxy server.

BACKGROUND OF THE DISCLOSURE

A proxy server acts as an intermediary in an exchange of communicationbetween a client computer and a server computer. The respectiveconnections between the proxy server and the client and server arecollectively referred to as a “proxy connection,” and the proxy serveris said to be processing the proxy connection. A proxy connection may beestablished, for example, for security-related monitoring, or forpreventing access to certain websites.

SUMMARY OF THE DISCLOSURE

There is provided, in accordance with some embodiments described herein,apparatus for use with at least one proxy server processing at least onecurrent proxy connection. The apparatus includes a digital memory,configured to store one or more packet identifiers, and proxy-managingcircuitry. The proxy-managing circuitry is configured to (i) receive aplurality of communication packets, (ii) using the packet identifiers,identify those of the communication packets that belong to the currentproxy connection, and (iii) perform a health-status check of the proxyserver. In response to a failure in the health-status check of the proxyserver, the proxy-managing circuitry maintains the current proxyconnection, by directing to the proxy server those of the communicationpackets that belong to the current proxy connection, and prevents anynew proxy connections from being processed by the proxy server, by notdirecting at least some of the communication packets to the proxyserver.

In some embodiments, the apparatus includes a packet broker thatincludes the proxy-managing circuitry.

In some embodiments, the apparatus further includes a bypass switch,including:

a network interface, configured to receive the communication packets viaa network; and

bypass-switch circuitry, configured to direct the communication packetsto the proxy-managing circuitry.

In some embodiments, the bypass-switch circuitry is further configuredto:

perform a health-status check of the proxy-managing circuitry, and,

in response to a failure in the health-status check of theproxy-managing circuitry, bypass the proxy-managing circuitry, by notdirecting communication packets received by the network interface to theproxy-managing circuitry.

In some embodiments,

the packet identifiers include respective packet-identifier 5-tuples,

respective headers of the communication packets include respectivecommunication-packet 5-tuples, and

the proxy-managing circuitry is configured to identify those of thecommunication packets that belong to the current proxy connection byattempting to match the communication-packet 5-tuples with thepacket-identifier 5-tuples.

In some embodiments, the apparatus further includes the proxy server,and the proxy server is configured to fail the health-status check inresponse to receiving a shutdown command.

There is further provided, in accordance with some embodiments describedherein, a method for use with at least one proxy server processing atleast one current proxy connection. Using proxy-managing circuitry, aplurality of communication packets are received, and those of thecommunication packets that belong to the current proxy connection areidentified. A health-status check of the proxy server is performed. Inresponse to a failure in the health-status check of the proxy server,(i) the current proxy connection is maintained, by directing to theproxy server those of the communication packets that belong to thecurrent proxy connection, and (ii) any new proxy connections areprevented from being processed by the proxy server, by not directing atleast some of the communication packets to the proxy server.

In some embodiments, the method further includes:

performing a health-status check of the proxy-managing circuitry, and,

in response to a failure in the health-status check of theproxy-managing circuitry, bypassing the proxy-managing circuitry, by notdirecting received communication packets to the proxy-managingcircuitry.

In some embodiments, identifying those of the communication packets thatbelong to the current proxy connection includes identifying those of thecommunication packets that belong to the current proxy connection usingone or more packet identifiers that are stored in a digital memory.

In some embodiments,

the packet identifiers include respective packet-identifier 5-tuples,

respective headers of the communication packets include respectivecommunication-packet 5-tuples, and

identifying those of the communication packets that belong to thecurrent proxy connection includes identifying those of the communicationpackets that belong to the current proxy connection by attempting tomatch the communication-packet 5-tuples with the packet-identifier5-tuples.

In some embodiments, the method further includes, using the proxyserver, failing the health-status check in response to receiving ashutdown command.

There is further provided, in accordance with some embodiments describedherein, a computer software product including a tangible non-transitorycomputer-readable medium in which program instructions are stored. Theinstructions, when read by a processor, cause the processor to (i)receive a plurality of communication packets, (ii) using a plurality ofpacket identifiers stored in a digital memory, identify those of thecommunication packets that belong to a current proxy connection of proxyserver, (iii) perform a health-status check of the proxy server, and(iv) in response to a failure in the health-status check of the proxyserver, (a) maintain the current proxy connection, by directing to theproxy server those of the communication packets that belong to thecurrent proxy connection, and (b) prevent any new proxy connections frombeing processed by the proxy server, by not directing at least some ofthe communication packets to the proxy server.

In some embodiments,

the packet identifiers include respective packet-identifier 5-tuples,

respective headers of the communication packets include respectivecommunication-packet 5-tuples, and

the instructions cause the processor to identify those of thecommunication packets that belong to the current proxy connection byattempting to match the communication-packet 5-tuples with thepacket-identifier 5-tuples.

The present disclosure will be more fully understood from the followingdetailed description of embodiments thereof, taken together with thedrawings, in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic illustration of apparatus for use with at leastone proxy server, in accordance with some embodiments described herein;and

FIGS. 2A and 2B are flow diagrams for methods described herein, inaccordance with some embodiments described herein.

DETAILED DESCRIPTION OF EMBODIMENTS Overview

In embodiments that are described herein, a proxy-managing devicereferred to as a packet broker performs a health-status check of a proxyserver while the proxy server processes one or more proxy connections.For example, the packet broker may attempt to exchange a heartbeatsignal with the proxy server, one or more times. If none of theattempted exchanges are successful, the health-status check is assumedto have failed, and consequently, the proxy server is assumed to beunhealthy (i.e., failing), e.g., due to being overloaded. In such cases,a failover is desirable.

One option is to implement a “hard” failover, in which no furthercommunication packets are directed to the proxy server until the proxyserver is once again healthy. However, a disadvantage of such a hardfailover is that current proxy connections are torn down.

Hence, some embodiments described herein implement a “soft” failover, inwhich the packet broker prevents new proxy connections from beingprocessed by the proxy server, but maintains at least one (e.g., all) ofthe current proxy connections that are being processed by the proxyserver.

System Description

Reference is initially made to FIG. 1, which is a schematic illustrationof apparatus 21 for use with at least one proxy server 36, in accordancewith some embodiments that are described herein. Apparatus 21 comprisesa packet broker 34 and/or any other suitable proxy-managing device,comprising proxy-managing circuitry 37. Although FIG. 1 shows a singleproxy server, it is noted that apparatus 21 may be used to managemultiple proxy servers.

Apparatus 21 typically further comprises a bypass switch 20, comprisinga network interface, such as a network interface card (NIC) 22, whichreceives communication packets that are exchanged over a network 24. Forexample, communication packets exchanged over network 24 between aclient 26 and a server 28 may be received en route by NIC 22. Thesepackets are passed to bypass-switch circuitry 30, which, under normalcircumstances, directs the packets to packet broker 34. Packet broker 34receives the communication packets from the bypass switch, andsubsequently, under normal circumstances, directs the communicationpackets to proxy server 36. Upon receiving a communication packet, theproxy server, which typically may process more than one current proxyconnection, identifies the proxy connection to which the packet belongs,and processes the packet as appropriate. The packet is then passed backto the packet broker, then back to the bypass switch, and finally, tothe destination in the network.

The proxying that is performed by proxy server 36 may be performed underany suitable communication protocol, including Transmission ControlProtocol (TCP) proxying, Hypertext Transfer Protocol (HTTP) proxying,and/or Secure Sockets Layer (SSL) proxying.

The packet broker continually (e.g., periodically) performshealth-status checks of the proxy server, such as by attempting toexchange heartbeat signals HB1 with the proxy server. If, as isgenerally the case under normal circumstances, the health-status checkis successful (e.g., signal HB1 is returned by the proxy server to thepacket broker), the packet broker continues to direct communicationpackets to the proxy server, as described above. On the other hand, ifthe health-status check is unsuccessful (e.g., one or more attemptedexchanges of heartbeat signals fail), the packet broker implements asoft failover. In such a failover, the packet broker prevents any newproxy connections from being processed by the proxy server, by notdirecting at least some of the received communication packets to theproxy server. Nevertheless, as noted above, the packet broker maintainsat least one (e.g., all) of the current proxy connections, by directingto the proxy server those of the communication packets that belong tothe at least one of the current proxy connections.

In typical embodiments, bypass-switch circuitry 30 continually (e.g.,periodically) performs health-status checks of the proxy-managingcircuitry, such as by attempting to exchange heartbeat signals HB0 withthe proxy-managing circuitry. In response to a failed health-statuscheck, the bypass-switch circuitry bypasses the proxy-managingcircuitry, by not directing communication packets received at thenetwork interface to the proxy-managing circuitry. In other words, thebypass switch implements a hard failover, in which the bypass-switchcircuitry effectively functions as a “short circuit,” by immediatelypassing the received communication packets back to NIC 22, which thentransmits the packets to their respective destinations in the network,without first sending the packets to the proxy server.

Typically, the packet broker further comprises a digital memory 38, inwhich proxy-managing circuitry 37 stores one or more packet identifiers.For example, the proxy-managing circuitry may store all of theidentifiers that are associated with the proxy server's current proxyconnections. The stored packet identifiers are then used to identifythose of the communication packets that belong to a current proxyconnection, thus facilitating the above-described soft failover. Forexample, upon receiving a communication packet in failover mode, theproxy-managing circuitry may direct the received packet to the proxyserver, only if the identifier of the received packet matches one of thestored identifiers.

In some embodiments, each of the packet identifiers includes arespective packet-identifier 5-tuple, which includes a source InternetProtocol (IP) address and port number, a destination IP address and portnumber, and a communication protocol. In such embodiments, theproxy-managing circuitry attempts to match the respectivecommunication-packet 5-tuple that is included in the header of eachreceived communication packet with the stored packet-identifier5-tuples. A match with one of the packet-identifier 5-tuples indicatesthat the communication packet belongs to a current proxy connection.

In some embodiments, the proxy server is configured to fail thehealth-status check of the packet broker, even if the proxy server ishealthy, in response to receiving a shutdown command. In other words, inresponse to receiving a shutdown command, the proxy server behaves as ifit were unhealthy, by failing the health-status check. The packet brokerthen prevents new proxy connections from being processed by the proxyserver, but maintains one or more of the current proxy connections, asdescribed above. In this manner, a smoother shutdown is achieved,relative to if the proxy server were to simply tear down all currentproxy connections by immediately shutting down.

The configuration of apparatus 21 shown in FIG. 1, and the internalconfigurations of packet broker 34 and bypass switch 20, are exampleconfigurations that are depicted purely for the sake of conceptualclarity. In alternative embodiments, any other suitable configurationsmay be used.

In some embodiments, the packet broker and bypass switch are implementedsolely in hardware, e.g., using one or more Application-SpecificIntegrated Circuits (ASICs) or Field-Programmable Gate Arrays (FPGAs).In other embodiments, the packet broker and/or bypass switch is at leastpartly implemented in software. For example, in some embodiments,proxy-managing circuitry 37 and/or bypass-switch circuitry 30 isembodied as a processor comprising at least a central processing unit(CPU) and random access memory (RAM). Program code, including softwareprograms, and/or data are loaded into the RAM for execution andprocessing by the CPU. The program code and/or data may be downloaded tothe processor in electronic form, over a network, for example.Alternatively or additionally, the program code and/or data may beprovided and/or stored on non-transitory tangible media, such asmagnetic, optical, or electronic memory. Such program code and/or data,when provided to the proxy-managing processor, and/or bypass-switchprocessor, produce a machine or special-purpose computer, configured toperform the tasks described herein.

Reference is now made to FIGS. 2A-B, which are flow diagrams for methodsdescribed hereinabove, in accordance with some embodiments describedherein.

FIG. 2A shows the method by which the packet broker determines whetherto enter the failover mode described above, in which the packet brokerprevents new proxy connections from being processed by the proxy server.At a checking step 40, the packet broker performs a health-status checkof the proxy server, as described above. At a result-assessment step 42,the packet broker assesses the result of the health-status check, andthus determines if the proxy server is healthy. If the proxy server ishealthy and the packet broker is currently in failover mode, the packetbroker exits failover mode, at a failover-mode-exiting step 46.Conversely, if the proxy server is not healthy and the packet broker iscurrently not in failover mode, the packet broker enters failover mode,at a failover-mode-entering step 44. Subsequently, the packet brokercontinues to perform health-status checks, for continual monitoring ofthe proxy server.

FIG. 2B shows the performance of the packet broker in failover mode. Ata receiving step 48, the packet broker receives the next communicationpacket, as described above. The packet broker then determines, at adecision step 50, whether the communication packet belongs to a currentproxy connection, as described above. If yes, the packet broker directsthe packet to the proxy server, at a packet-directing step 54.Otherwise, the packet broker directs the packet away from the proxyserver, at an alternate packet-directing step 52. For example, thepacket broker may direct the packet to another (healthy) proxy server,or back to the bypass switch. The packet broker then continues toreceive subsequent communication packets.

It will be appreciated by persons skilled in the art that the presentinvention is not limited to what has been particularly shown anddescribed hereinabove. Rather, the scope of the present inventionincludes both combinations and subcombinations of the various featuresdescribed hereinabove, as well as variations and modifications thereofthat are not in the prior art, which would occur to persons skilled inthe art upon reading the foregoing description. Documents incorporatedby reference in the present patent application are to be considered anintegral part of the application except that to the extent any terms aredefined in these incorporated documents in a manner that conflicts withthe definitions made explicitly or implicitly in the presentspecification, only the definitions in the present specification shouldbe considered.

The invention claimed is:
 1. An apparatus for use with at least oneproxy server processing at least one current proxy connection between aclient and a server in a network, the apparatus comprising: a packetbroker comprising: a digital memory, configured to store one or morepacket identifiers; and proxy-managing circuitry, configured to: receivea plurality of communication packets, using the packet identifiers,identify those of the communication packets that belong to the currentproxy connection, perform a health-status check of the proxy server, andin response to a failure in the health-status check of the proxy server:maintain the current proxy connection, by directing to the proxy serverthose of the communication packets that belong to the current proxyconnection, and prevent any new proxy connections from being processedby the proxy server, by not directing at least some of the communicationpackets to the proxy server; and a bypass switch in communication withthe network and the packet broker, wherein the bypass switch is betweenthe network and the packet broker.
 2. The apparatus according to claim1, the bypass switch comprising: a network interface, configured toreceive the communication packets via a network; and bypass-switchcircuitry, configured to direct the communication packets to theproxy-managing circuitry.
 3. The apparatus according to claim 2, whereinthe bypass-switch circuitry is further configured to: perform ahealth-status check of the proxy-managing circuitry, and, in response toa failure in the health-status check of the proxy-managing circuitry,bypass the proxy-managing circuitry, by not directing communicationpackets received by the network interface to the proxy-managingcircuitry.
 4. The apparatus according to claim 1, wherein the packetidentifiers include respective packet-identifier 5-tuples, whereinrespective headers of the communication packets include respectivecommunication-packet 5-tuples, and wherein the proxy-managing circuitryis configured to identify those of the communication packets that belongto the current proxy connection by attempting to match thecommunication-packet 5-tuples with the packet-identifier 5-tuples. 5.The apparatus according to claim 1, further comprising the proxy server,wherein the proxy server is configured to fail the health-status checkin response to receiving a shutdown command.
 6. A method for use with atleast one proxy server processing at least one current proxy connectionbetween a client and a server in a network, the method comprising, usingproxy-managing circuitry comprising a packet broker and a bypass switch:receiving a plurality of communication packets at the bypass switch;identifying those of the communication packets that belong to thecurrent proxy connection; performing a health-status check of the proxyserver; and in response to a failure in the health-status check of theproxy server: maintaining the current proxy connection, by directing tothe proxy server those of the communication packets that belong to thecurrent proxy connection, and preventing any new proxy connections frombeing processed by the proxy server, by not directing at least some ofthe communication packets to the proxy server.
 7. The method accordingto claim 6, further comprising: performing a health-status check of theproxy-managing circuitry, and, in response to a failure in thehealth-status check of the proxy-managing circuitry, bypassing theproxy-managing circuitry, by not directing received communicationpackets to the proxy-managing circuitry.
 8. The method according toclaim 6, wherein identifying those of the communication packets thatbelong to the current proxy connection comprises identifying those ofthe communication packets that belong to the current proxy connectionusing one or more packet identifiers that are stored in a digitalmemory.
 9. The method according to claim 8, wherein the packetidentifiers include respective packet-identifier 5-tuples, whereinrespective headers of the communication packets include respectivecommunication-packet 5-tuples, and wherein identifying those of thecommunication packets that belong to the current proxy connectioncomprises identifying those of the communication packets that belong tothe current proxy connection by attempting to match thecommunication-packet 5-tuples with the packet-identifier 5-tuples. 10.The method according to claim 6, further comprising, using the proxyserver, failing the health-status check in response to receiving ashutdown command.
 11. A computer software product comprising a tangiblenon-transitory computer-readable medium in which program instructionsare stored, which instructions, when read by a processor, cause theprocessor to: receive a plurality of communication packets between aclient and a server in a network via a bypass switch, the bypass switchin communication with a broker having a digital memory, using aplurality of packet identifiers stored in the digital memory, identifythose of the communication packets that belong to a current proxyconnection of a proxy server, perform a health-status check of the proxyserver, and in response to a failure in the health-status check of theproxy server: maintain the current proxy connection, by directing to theproxy server those of the communication packets that belong to thecurrent proxy connection, and prevent any new proxy connections frombeing processed by the proxy server, by not directing at least some ofthe communication packets to the proxy server.
 12. The computer softwareproduct according to claim 11, wherein the packet identifiers includerespective packet-identifier 5-tuples, wherein respective headers of thecommunication packets include respective communication-packet 5-tuples,and wherein the instructions cause the processor to identify those ofthe communication packets that belong to the current proxy connection byattempting to match the communication-packet 5-tuples with thepacket-identifier 5-tuples.